package client;

import command.Command;
import command.CommandDec;
import command.CommandInc;
import command.CommandMeasure;
import command.CommandOff;
import command.CommandOn;
import command.CommandTempo;
import command.CommandTreatment;
import controller.Controller;
import controller.ControllerImpl;

import materiel.Horloge;
import materiel.HorlogeImpl;
import moteur.Moteur;
import moteur.MoteurImpl;

import ihm.Ihm;
import ihm.IhmImpl;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author 27002621
 */
public class Client {
	public static void main(String args[]){
		Horloge horloge=new HorlogeImpl();
		Ihm ihm=new IhmImpl();
		Moteur moteur=new MoteurImpl(124, 4, horloge);
		Controller controller=new ControllerImpl(moteur, ihm);
		Command cmdDec=new CommandDec(controller);
		Command cmdInc=new CommandInc(controller);
		Command cmdMeasure=new CommandMeasure(controller);
		Command cmdOff=new CommandOff(controller);
		Command cmdOn=new CommandOn(controller);
		Command cmdTempo=new CommandTempo(controller);
		Command cmdTreatment=new CommandTreatment(controller);
		moteur.setCmdMeasure(cmdMeasure);
		moteur.setCmdTempo(cmdTempo);
		moteur.setCmdTreatment(cmdTreatment);
		moteur.attach(controller);
		ihm.setCmdDec(cmdDec);
		ihm.setCmdInc(cmdInc);
		ihm.setCmdOff(cmdOff);
		ihm.setCmdOn(cmdOn);
		ihm.attach(controller);
	}
}